<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"/var/www/html/tp5/public/../application/mobile/view/Login/index.html";i:1530166482;}*/ ?>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="/static/mobile/css/bootstrap/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/static/mobile/css/login/login.css" />
    <script type="text/javascript" src="/static/mobile/js/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="/static/mobile/js/bootstrap/bootstrap.min.js"></script>
    <script src="/static/index/js/jquery.min.js"></script>
            <script src="/static/index/js/toastr.min.js"></script>
            <link href="/static/admin/css/toastr.min.css" rel="stylesheet"/>
</head>
<body>
    <div class="container">
        <div class="row row1">

            <div class="pull-left pull-pos"><a href="<?php echo url('mobile/Index/index'); ?>" class="text-qx"><h4>取消</h4></a></div>

            <div class="center-block text-center"><h3 style="color:#42BD56;"><strong>登录ShowMovie</strong></h3></div>
        </div>
        <div class="col-xs-12">
                <div class="form-group form-group-lg" style="margin-top: 30px;">
                    <div class="col-sm-12">
                        <input class="form-control" type="text" id="email" name="email" placeholder="请输入邮箱">
                    </div>
                </div>
                <div class="form-group form-group-lg">
                    <div class="col-sm-12">
                        <input class="form-control" type="password" id="password" name="password" placeholder="密码">
                    </div>
                </div>
                <div class="form-group form-group-lg">
                    <div class="col-sm-12">
                        <button class="btn btn-success btn-lg btn-block mobile-log">登录</button>
                    </div>
                </div>
            <div class="form-group form-group-lg">
                <div class="col-sm-12" style="text-align:center;">
                    <a href="<?php echo url('mobile/Login/sms'); ?>">邮箱麻烦？换手机登录呗</a>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <script type="text/javascript" src="/static/admin/js/bootstrap.min.js"></script>
    <script>
        $(function(){
            $('.mobile-log').click(function (){
                mobilelog();
            });
            function mobilelog(){
                $.ajax({
                    type: 'post',
                    url: '/mobile/Login/dologin',
                    data: {
                        email : $('#email').val(),
                        password : $('#password').val()
                    },
                    dataType: 'json',
                    success: function (data) {
                       if (data) {
                               toastr.success('登录成功,拼命加载ing╭(●｀∀´●)╯╰(●’◡’●)╮ (●’◡’●)ﾉ ヾ(*´▽‘*)ﾉ');
                                setInterval(function(){
                                        location.href='http://47.96.69.12/mobile/index/index';
                                    }, 1000);
                            } else {
                                toastr.error('登录失败,请检查登录账号和密码');
                            }
                    },
                    error: function () {
                        alert('AJAX操作失败');
                    }
                });
            }

        });
    </script>
</body>
</html>
